package cn.wolfcode.wms.mapper;

import cn.wolfcode.wms.domain.Brand;
import cn.wolfcode.wms.domain.ProductStock;
import cn.wolfcode.wms.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ProductStockMapper {

    int insert(ProductStock record);

    int updateByPrimaryKey(ProductStock record);

    /**
     * 根据商品的ID和仓库的ID查询库存
     * @param productId
     * @param depotId
     * @return
     */
    ProductStock selectByProductAndDepot(@Param("productId") Long productId,
                                         @Param("depotId") Long depotId);

    Integer queryForCount(QueryObject qo);

    List<Map<String,Object>> queryForPage(QueryObject qo);
}